package STUDENT.NGUYENHUUTHANG.MVC.B5;

public class Models {
	public boolean CheckRegistration(PersonObject objPerson) {
		if (objPerson.getAge() < 19) {
			return false;
		} else if ((objPerson.getGender().equals("male") && objPerson.getAge() >= 22
				&& (objPerson.getMarriage().equals("divorce") || objPerson.getMarriage().equals("unmarried")))
				|| ((objPerson.getGender().equals("female") && objPerson.getAge() >= 19
						&& (objPerson.getMarriage().equals("divorce")
								|| objPerson.getMarriage().equals("unmarried"))))) {
			return true;
		} else
			return false;
	}
}
